﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hiro.Interfaces;
using Hiro.ActivationPoints.Interfaces;

namespace Hiro.Loaders.Interfaces
{
    /// <summary>
    /// Represents a type that can generate a list of services whenever there is a service type
    /// that has multiple implementations and the loading process cannot automatically resolve the
    /// services that need to be implemented.
    /// </summary>
    public interface IServiceResolver
    {
        /// <summary>
        /// Resolves a list of services from a single <paramref name="serviceType"/> that is implemented
        /// by multiple <paramref name="activationPoints"/>.
        /// </summary>
        /// <param name="serviceType">The service type.</param>
        /// <param name="activationPoints">The list of activation points that implement the service type.</param>
        /// <returns>A list of services that implement the service type.</returns>
        IEnumerable<IService> Resolve(Type serviceType, IEnumerable<ITypeActivationPoint> activationPoints);
    }
}
